﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InductBase
{
    public class RandomList<T>: List<T>
    {
        Random rand;

        public RandomList():base()
        {

        }

        public T GetRandomItem()
        {
            if (rand == null) rand = new Random();
            if (this.Count < 1) return default(T);
            return this[rand.Next(0,this.Count-1)];
        }
    }
}
